<% layoutFor("title") { out.print guiContext.title; } %>
<style>
    .x-frame-toolbar,
    .x-frame-content-right-left {
        display:none;
    }
</style>
<br/>
<label name="description">  <%~ description %></label>
<span id="engineList">
<%~ listFor(guiList) { guiList ->
        guiList.row {row ->
          String css = row.record.isOperational() ? "enabled " : "disabled "
          row.formatContent(row.getTemplate("Row"), [cls:(css + row.getIntervalCss()), cells:row.outputCells()]);
        }
        guiList.cell("name") {column, value, record ->
            String href = "/engines/"+record.id
            String label = String.format("<a href='%s'>%s</a>", href, record.getName());
            column.formatContent(column.getTemplate("Cell"), [cls:column.getName(),text:label]);
        }

        guiList.cell("operational") {column, value, record ->
            String label = record.isOperational() ? l("engine.operational.enable") : l("engine.operational.disable");
            column.formatContent(column.getTemplate("Cell"), [cls:column.getName(),text:label]);
        }
        guiList.cell("connected") {column, value, record ->
            String label = record.isConnected() ? l("engine.connected.enable") : l("engine.connected.disable");
            column.formatContent(column.getTemplate("Cell"), [cls:column.getName(),text:label]);
        }

        guiList.cell("errorMessage") {column, value, record ->
            String label = (record.getErrorMessage()==null)?"Success":record.getErrorMessage();
            column.formatContent(column.getTemplate("Cell"), [cls:column.getName(),text:label]);
        }
    }
%>
</span>

